package com.yc.plugin.app

import android.content.Context
import android.os.Bundle
import android.widget.Button
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
//import com.yc.commontlib.image.GlideApp
import com.yc.commontlib.image.YcImageUtils

/**
 * Creator: yc
 * Date: 2021/6/3 15:15
 * UseDes:
 */
class PluginTestGlideActivity : AppCompatActivity() {
    private lateinit var mIvNet: ImageView
    private lateinit var mIvRes: ImageView
    private val IMG = "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201710%2F16%2F20171016232720_CGLMU.jpeg&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1625392653&t=e42e57c5917d8378079bf7742f0d4c00"

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.plugin_test_glide_activity)
        mIvRes = findViewById(R.id.ivTestGlideRes)
        mIvNet = findViewById(R.id.ivTestGlideNet)
        findViewById<Button>(R.id.btnTestGlideRes).setOnClickListener {
            YcImageUtils.load(this, R.drawable.plugin_test, mIvRes)
        }
        findViewById<Button>(R.id.btnTestGlideNet).setOnClickListener {
//            GlideApp.with(this)
//                .asBitmap()
//                .load(IMG)
//                .into(mIvNet)
        }
    }
}